This application claims the priority of Korean Patent Application No. 2003-55877, filed on Aug. 12, 2003, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to a video data transmission system, and more specifically, to a method of transmitting video data, and a method of controlling an encoding (bit) rate, an encoding (bit) rate controller for a moving picture expert group 2 (MPEG-2) video encoder, and a video data transmission system performing the methods.
2. Description of the Related Art
In the related art, two general methods of controlling an encoding rate in MPEG-2 video encoders have been employed. One such general method is the constant bit-rate (CBR) control method, and the other is the variable bit-rate (VBR) control method. In a constant bit-rate control method video data, such as digital television (DTV) broadcasting signals, are encoded into a predetermined number-of-bits per a predetermined time, and buffer constraints are imposed to circumvent large deviations from a desired rate at any instant in time. A typical CBR method enforces a constant bit rate (CBR) for a group of pictures (GOP) regardless of the complexity of the video interval. This scheme assumes equal weighting of bit distribution among GOPs and reduces the degree of freedom of the encoding task. The GOP distortion (quality) is minimized (maximized) subject to a constant target rate. CBR implies the sustainable rate of the encoded video stream per GOP is close to a constant target rate, but the instantaneous rate changes per picture depending on picture type2 or the quantization scaler.
An MPEG-2 sequence is typically partitioned into small intervals called GOPs (groups of pictures), which in turn are categorized by picture types “I” (intracoded or intrapicture), “P” (predicted), and “B” (bidirectionally predicted). The number of bits per GOP is distributed such that the allocation for an I-picture is more than that for a P-picture. This is because a P-picture uses a motion-estimation (ME) technique to estimate its content; as a result, a motion-compensated frame difference (MCFD) with a lower entropy than the original source is encoded. B-pictures use the smallest number of bits because their ME techniques are more intensive than those for P-pictures. This method provides a basis for maintaining the same picture quality within a GOP when pictures of different types are encoded.
CBR MPEG-2 encoders enforce different quantizing scalers for each picture type to achieve good-quality streams within a GOP. In the constant bit-rate control method, since both of still picture video data and motion picture video data are encoded into the same number of bits, the quality of the motion pictures, to which more bits should be allocated, is relatively low. One way to improve the perceptual quality of a CBR stream while maintaining its constant rate from start to finish is to identify “difficult-to-encode” pictures and increase their bit budget accordingly. Conventional approaches to real-time CBR encoding use picture-to-picture correlations in terms of “complexity” measures to predict the level of encoding-difficulty of a particular picture. If the statistical features of the image source changes rapidly over time, a constant-bit-rate (CBR) operation may result in good picture quality for a short time window (e.g., a few frames or a GOP) but discontinuous quality when the entire video is perceived by a consumer.
In the variable bit-rate (VBR) control method, since more bits can be allocated to the motion picture video data when data transmission rate is variable, such as in a case where the bandwidth is large enough or storage mediums such as digital video disks (DVDs) are used, it is possible to improve the quality of the motion pictures as compared with using the constant bit-rate (CBR) control method. The video data, which are compressed by encoding the video data (e.g., obtained from video cameras), can be transported through wireless LANs or DTV transmitters, and output as radio frequency (RF) signals. Additionally, the compressed video data can be coded and recorded on fixed media such as DVD optical disks, etc.
The quality of the decoded images is a direct consequence to the number of bits invested in the encoding process. The adjustment of the quantization scaling parameter is a method to influence the number of coding bits. A conventional method of adjusting quantizer scale as a macroblock quantization parameter is mainly used for controlling the encoding rates of the MPEG-2 video encoders. Each picture, of any type, is subdivided into square blocks of pixels called macroblocks. Each picture is composed of slices which are, by definition, a series of macroblocks. The “macroblock” means pixel data (for example, 16×16 pixels) of a relevant window when “I” (intra-coded picture) frame data, “P” (predictive-coded picture) frame data and “B” (bidirectionally predictive-coded picture) frame data require predetermined windows. The pixel data representing luminance (gray levels) is typically 8-bit data. The picture quality and rate of an MPEG-2 encoder is achieved for a particular picture by selecting a specific quantizer scale for each macroblock in the picture. Multiplication of the Quantizer Scale, MQUANT, and the corresponding element of a Quantizer Matrix produces quantized (DCT) coefficients. In general, the higher the MQUANT value, the lower the bit rate but also the lower the quality (according to well-known rate-distortion theory).
Devising a rate-control (RC) algorithm is a part of the conventional encoding method. The rate-control algorithm monitors the number of bits that should be allocated to encode each picture or macroblock on the basis of image-type or image feature, respectively. Moreover, it should be devised to ensure that the decoder buffer does not experience an overflow or underflow during the time the stream is received from the communication channel and prepared for decoding. The following are typically employed in MPEG-2 compression schemes:                A. Target number-of-bits (or quantization scalers) for each picture type.        B. Buffer regulation to avoid overflow/underflow conditions.        C. Maintenance of a target rate or consumption of no more than the bit budget.        D. A rate-control strategy which ensures that all of the above are monitored/satisfied.        
A conventional method of controlling the encoding rate by using the variable bit-rate (VBR) control method can be approximately divided into three steps. The first step (A) is a bit allocation step of allocating the (Target) number of bits-per-picture (suitable for the picture type I, P or B) to each frame; the second step is a rate control step of determining quantization scales, and the third step is an adaptive quantization step of adjusting the quantization scales for all the macroblocks of the picture type I, P or B.
In the bit allocation step, a “complexity” is defined by using a relation between the encoding rate and the distortion; the number of bits-per-picture of the current picture type (I, P or B) is determined with reference to the “complexity” of the previously encoded picture (of type I, P or B), and then the determined (Target) number of bits-per-picture is allocated. In the rate control step, the quantizer scale is computed on the basis of a virtual amount of buffer or the complexity of the previous picture (of type I, P or B). Here, since the quantizer scale is inversely proportional to the number of encoding bits, the number of encoding bits becomes smaller with increase of the quantizer scale. In the adaptive quantization step, a new quantizer scale is determined for the current macroblock by using the activity (degree of data variation) of the previous macroblock(s).
Such a conventional method of controlling an encoding rate by using the variable bit-rate control method has a problem, related to the bit allocation step, that in view of a variety of efforts to find the closest equation representing best the relation between the encoding rate and the distortion, it is difficult to define the exact rate-distortion (R-D) relationship, and even if the closest equation is defined, it cannot cope with the variations of the picture type (I, P or B).
Further, the conventional method of controlling an encoding rate also has a problem, related to the adaptive quantization step, in that a calculation of the new quantizer scales for all the macroblocks does not provide much higher picture quality improvement relative to its usage of bits. In order to mitigate this problem, a conventional method of using one quantizer scale for one entire picture may be employed, but this method is not effective when various features exist in the picture.